// pilot pairDlg.h : header file
//

#if !defined(AFX_PILOTPAIRDLG_H__18164864_4C50_4315_879D_3B41E4AF0698__INCLUDED_)
#define AFX_PILOTPAIRDLG_H__18164864_4C50_4315_879D_3B41E4AF0698__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "utility.h"
/////////////////////////////////////////////////////////////////////////////
// CPilotpairDlg dialog
#define  WM_BESTFINISH WM_USER + 1
#define  WM_QUICKFINISH WM_USER + 2
#define	 WM_FOOFINISH WM_USER + 3
#define  WM_BRANCHBOUNDFINISH WM_USER + 4
#define WM_OPTIMALFINISH WM_USER + 5
class CPilotpairDlg : public CDialog
{
// Construction
public:
	CPilotpairDlg(CWnd* pParent = NULL);	// standard constructor
	~CPilotpairDlg();
// Dialog Data
	//{{AFX_DATA(CPilotpairDlg)
	enum { IDD = IDD_PILOTPAIR_DIALOG };
	CString	m_info;
	int		m_pilotNum;
	int		m_no1;
	int		m_no2;
	int		m_cost;
	int		m_semNum;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CPilotpairDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL
friend static unsigned long __stdcall FindOptimal(void * pThis);	
friend static unsigned long __stdcall FindBrute(void * pThis);
friend static unsigned long __stdcall FindGreedy(void * pThis);
friend static unsigned long __stdcall FindBackTracking(void * pThis);
friend static unsigned long __stdcall FindBranchBound(void * pThis);
// Implementation
protected:
	HICON m_hIcon;
	vector<CostSet> m_costSet;
	vector<CostSet> m_bestPairs;
	vector<CostSet> m_finalPairs;

	float m_callpsedTime;
	ALGraph m_g;
	// Generated message map functions
	//{{AFX_MSG(CPilotpairDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnRadom();
	afx_msg void OnBrute();
	afx_msg LRESULT BruteFinishHandle(WPARAM nID,LPARAM lParam);
	afx_msg LRESULT GreedyFinishHandle(WPARAM nID,LPARAM lParam);
	afx_msg LRESULT BackTrackingFinishHandle(WPARAM nID,LPARAM lParam);
	afx_msg LRESULT BranchBoundFinishHandle(WPARAM nID,LPARAM lParam);
	afx_msg LRESULT OptimalFinishHandle(WPARAM nID,LPARAM lParam);
	afx_msg void OnGreedy();
	afx_msg void OnBackTracking();
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	afx_msg void OnBranchbound();
	afx_msg void OnOptimal();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_PILOTPAIRDLG_H__18164864_4C50_4315_879D_3B41E4AF0698__INCLUDED_)
